home *** CD-ROM | disk | FTP | other *** search
/ BBS in a Box 15 / BBS in a box XV-1.iso / Files / Internet / Info / Internet Roadmap.sit / Internet Roadmap ƒ / Map 14 Ftp (Part 2)↵ < prev    next >
Encoding:
Text File  |  1995-02-14  |  12.6 KB  |  393 lines  |  [ttro/ttxt]

  1. MAP14: FTP (PART 2)
  2. -------------------
  3.  
  4.      "Technology ... the knack of so arranging the world that we need
  5.       not experience it." -- Max Frisch, Homo Faber
  6.  
  7.  
  8. Yesterday I told you that the basic steps in an FTP session are:
  9.  
  10.      1. Start-up your FTP client
  11.      2. Give your FTP client an address to connect to (and, just
  12.         like TELNET, step one and two can be combined into one
  13.         easy step).
  14.      3. Identify yourself to the remote site
  15.      4. Give the remote site your password
  16.      5. Look around the directory for files
  17.      6. Change Directories
  18.      7. Set the transfer mode (optional)
  19.      8. Get the file(s) you want
  20.      9. Quit
  21.  
  22. I've accessed SURAnet's FTP site (ftp.sura.net), told the site that
  23. I am "anonymous", and given the site my full Internet address as
  24. my password.
  25.  
  26. Now that I'm in, I'm going to look around and see what the SURAnet
  27. FTP site has to offer.
  28.  
  29. (BTW, you can see a list of all of the acceptable commands for
  30. your FTP client by typing "help")
  31.  
  32. On most FTP clients, the command to list the contents of the current
  33. directory on the remote machine is just
  34.  
  35.           dir
  36.  
  37. My FTP client accepts and uses the "dir" command, so I type
  38.  
  39.           dir
  40.  
  41. and the following appears on my screen:
  42.  
  43.    >>>PORT 130,160,4,100,212,230
  44.    200 PORT command successful
  45.    >>>LIST
  46.    150 Opening ASCII mode data connection for /bin/ls.
  47.    total 728
  48.    drwxrwx--x   3 0        0              512 Aug  5 01:55 bin
  49.    drwxr-xr-x   2 0        1              512 May 10 12:47 etc
  50.    drwxrwxrwx   6 0        10             512 Oct 21 11:37 incoming
  51.    drwxr-xr-x   2 0        0             8192 Feb 15  1992 lost+found
  52.    -rw-r--r--   1 0        1           350142 Oct 25 00:00 ls-lR
  53.    drwxrwxr-r  24 0        100            512 May  3 13:25 pub
  54.  
  55. This is a listing of all of the stuff in the current directory.
  56. Let's take a look at the first entry and see if we can figure out
  57. what all of this means:
  58.  
  59.    drwxrwx--x   3 0        0              512 Aug  5 01:55 bin
  60.  
  61. If the line begins with a "-" instead of a "d", it is a file.
  62. The letter "d" at the beginning of this example tells me that this
  63. is not a file -- it is a subdirectory.
  64.  
  65. What does *THAT* mean? Well, pretend that the FTP site is simply
  66. a big house. You walk into the house through the front door, and
  67. you find yourself standing in an entry hall. The entry hall may
  68. have some neat stuff in it, but it also has doors leading to other
  69. rooms throughout the house.
  70.  
  71. The subdirectories -- the "d"s -- are just doors to other "rooms"
  72. at the FTP site, and the files -- the "-"s -- are the neat stuff
  73. that you can get while you are at the site.
  74.  
  75. Getting back to our example,
  76.  
  77.    drwxrwx--x   3 0        0              512 Aug  5 01:55 bin
  78.  
  79. the "drwxrwx--x" tells us that this entry is a subdirectory (the
  80. "rwxrwx--x" part is just some security stuff). The "512" tells
  81. us the size of the subdirectory in bytes.  The "Aug  5 01:55" tells
  82. us the date and time that this subdirectory was last updated. The
  83. last part -- the "bin" -- tells us the name of the subdirectory.
  84.  
  85. Let's look at one more example:
  86.  
  87.    -rw-r--r--   1 0        1           350142 Oct 25 00:00 ls-lR
  88.  
  89. There is a "-" instead of a "d", so this is a file. The "350142"
  90. tells us that the size of this file is 350,142 bytes, the file
  91. was last updated at midnight on October 25, and the name of this
  92. file is "ls-lR".
  93.  
  94. Let's get back to the main SURAnet directory contents:
  95.  
  96.    drwxrwx--x   3 0        0              512 Aug  5 01:55 bin
  97.    drwxr-xr-x   2 0        1              512 May 10 12:47 etc
  98.    drwxrwxrwx   6 0        10             512 Oct 21 11:37 incoming
  99.    drwxr-xr-x   2 0        0             8192 Feb 15  1992 lost+found
  100.    -rw-r--r--   1 0        1           350142 Oct 25 00:00 ls-lR
  101.    drwxrwxr-r  24 0        100            512 May  3 13:25 pub
  102.  
  103. I want to change this main directory and get into a subdirectory.
  104. To change directories on most FTP clients, you use the command
  105.  
  106.           cd <directory>
  107.  
  108. and replace <directory> with the name of the directory that you
  109. want to access.
  110.  
  111. Since I am interested in public information, I'm going to get
  112. into "pub" directory ("pub" is the standard FTP abbreviation
  113. for "public"). I type
  114.  
  115.           cd PUB
  116.  
  117. and the following appears on my screen:
  118.  
  119.    >>>CWD PUB
  120.    550 PUB: No such file or directory.
  121.  
  122. Uhhh ... what happened?
  123.  
  124. One of the unfortunate shortcomings of FTP is that, for most of you,
  125. FTP is *case sensitive*. My "cd PUB" command did not work because
  126. there is no "PUB" directory ... but there *IS* a "pub" directory :)
  127.  
  128. Let's try it again. I type
  129.  
  130.           cd pub
  131.  
  132. and the following appears on my screen:
  133.  
  134.    >>>CWD pub
  135.    250 CWD command successful.
  136.  
  137. Cool! It worked!
  138.  
  139. Now I need to see the contents of this new directory that I just
  140. entered. Do you remember what FTP command I should use? (Hint: it is
  141. "dir")
  142.  
  143. I type "dir", and the following appears on my screen:
  144.  
  145.    >>>PORT 130,160,4,100,215,140
  146.    200 PORT command successful.
  147.    >>>LIST
  148.    150 Opening ASCII mode data connection for /bin/ls.
  149.    Total 56
  150.    -rw-rw-r--   1 1023     100           4052 Apr 22  1994 README
  151.    drwxrwsr-x   2 1023     100            512 Aug  6  1993 SURAnet
  152.    drwxrwxr-x   6 1020     120            512 Mar  3  1992 archie
  153.    drwxrwxr-x   2 1034     120            512 Feb 15  1992 articles
  154.    drwxrwxr-x   2 1007     110            512 Jun 22 15:40 books
  155.    ... <stuff deleted by me>
  156.  
  157. Whoa! That first file -- README -- looks pretty important. I bet
  158. it contains some important information that will make my life a
  159. whole bunch easier (Good rule of thumb: if you see a file that
  160. contains the words README or INDEX, it is an important file).
  161.  
  162. I need to get this README file.
  163.  
  164. To get a file using FTP, you use the
  165.  
  166.           get filename
  167.  
  168. command, replacing <filename> with the name of the file that you
  169. want to get. The get command retrieves the file from the remote
  170. site and stores the file on your service provider's system.
  171.  
  172. Since I want to get the README file, I type
  173.  
  174.           get README
  175.  
  176. (making sure to use the correct case), and the following appears
  177. on my screen:
  178.  
  179.    Invalid local filename; use 'name.type.mode' or 'name.type'
  180.  
  181. Now what?!?
  182.  
  183. This is a problem that some of you may have when you try to get
  184. "one word" files. Some local Internet service providers require
  185. files stored on their machines to have some sort of extension or
  186. type. Your can't have a file whose name is just README ... it
  187. has to be README.<type> (i.e. README.DOC, README.TXT, etc).
  188.  
  189. Since the "get README" command did not work, I'm going to have to
  190. use the
  191.  
  192.           get <filename> <name I want it saved as>
  193.  
  194. command, replacing <remote file name> with README, and replacing
  195. <name I want it saved as> with the name that I want the file to
  196. be saved as on my service provider's computer.
  197.  
  198. So, I type
  199.  
  200.           get README README.DOC
  201.  
  202. and the following appears on my screen:
  203.  
  204.    >>>PORT 130,160,4,100,218,90
  205.    200 PORT command successful.
  206.    >>>RETR README
  207.    150 Opening ASCII mode data connection for README (4502 bytes).
  208.  
  209. After a few additional seconds, the following is added to my screen:
  210.  
  211.    226 Transfer complete.
  212.    4637 bytes transferred. Transfer rate 6.14 Kbytes/sec.
  213.  
  214. YIPEE! It worked!! Let's quit FTP and see what we did.
  215.  
  216. To quit ftp, you need to use either the "bye" or "quit" commands.
  217.  
  218. On my client, the command is "quit", so I type
  219.  
  220.           quit
  221.  
  222. and the following appears on my screen:
  223.  
  224.    221 Goodbye.
  225.    Ready; T=0.54/0.96 01:45:53
  226.  
  227. Okay .. I got the file. But where is it? It is sitting on my
  228. account on my service provider's system!
  229.  
  230. Depending on your system, it is either easy or hard to get into
  231. the files that get from FTP (in Unix, type "ls"; in VM, type "fl").
  232. Your local Internet service provider can tell you a little more
  233. about how to access, read, and print these files.
  234.  
  235. Looking at this new file that I just got from FTP, I discover that
  236. the contents of the README file are a brief explanation of what is
  237. in every subdirectory off of the pub directory (cool!):
  238.  
  239.    The following items are available anonymous ftp from
  240.    ftp.sura.net:
  241.  
  242.    Directories found under pub:
  243.  
  244.    archie/          Information on the archie service as well as client
  245.                     software to use archie.
  246.  
  247.    articles/        Text versions of articles in the SURAnet newsletter.
  248.  
  249.    books/           Subdirectory containing information on ordering
  250.                     discounted books through SURAnet.
  251.  
  252.    databases/       The databases in raw format that are also offered
  253.                     through our WAIS server.
  254.  
  255.    dns/             Software and documentation to help setup the Domain
  256.                     Name Server software on Unix machines (BIND)
  257.  
  258.    fdic/            The Federal Deposit Insurance Corporation's ftp
  259.                     archive.
  260.    ... <<stuff deleted by me>>
  261.  
  262. NEAT! :)
  263.  
  264. I want to go back and get one of the articles in the SURAnet newsletter.
  265. Thanks to what I learned from the README file, I now know that the
  266. files that I am looking for are in "pub" directory and in the
  267. "articles" subdirectory.
  268.  
  269. In FTP notation, I can write this as
  270.  
  271.           /pub/articles
  272.  
  273. This means the same thing as saying "in the pub directory, in
  274. the articles subdirectory" and, as you will soon see, this notation
  275. will eventually even save me a few steps.
  276.  
  277. Let's go back to SURAnet and get some newsletter articles!
  278.  
  279. I type
  280.  
  281.           ftp ftp.sura.net
  282.  
  283. and the following appears on my screen:
  284.  
  285.    Connecting to ftp.sura.net 128.167.254.179, port 21
  286.    220 nic.sura.net FTP server (Version wu-2.4(1) Fri May 20 10:20:58
  287.    EDT 1994) ready.
  288.    USER (identify yourself to the host):
  289.  
  290. Since I do not have an account on the SURAnet machine, I type
  291.  
  292.           anonymous
  293.  
  294. and the following appears on my screen:
  295.  
  296.    >>>USER anonymous
  297.    331 Guest login ok, send your complete e-mail address as password.
  298.    Password:
  299.  
  300. I type my full Internet address -- pcrispe1@ua1vm.ua.edu -- as
  301. my password, and the following appears on my screen:
  302.  
  303.    >>>PASS ********
  304.    230-    SURAnet ftp server running wuarchive experimental ftpd
  305.    230-
  306.    230-Welcome to the SURAnet ftp server.  If you have any problems with
  307.    230-the server please mail the to systems@sura.net. If you do have problems,
  308.    230-please try using a dash (-) as the first character of your password
  309.    230- -- this will turn off the continuation messages that may be confusing
  310.    230-your ftp client.
  311.    ...
  312.    230 Guest login ok, access restrictions apply.
  313.    Command:
  314.  
  315. I know that I want to get into the pub directory, and then into
  316. the articles subdirectory. I could type "cd pub" and then "cd articles"
  317. to get into the subdirectory that I want, but it would be easier to
  318. just jump into the "articles" directory with one command.
  319.  
  320. I can make such a jump using the /pub/articles notation introduced a
  321. few minutes ago. If I type
  322.  
  323.           cd /pub/articles
  324.  
  325. I jump straight into the "articles" directory, and the following appears
  326. on my screen:
  327.  
  328.    >>>CWD /pub/articles
  329.    250 CWD command successful.
  330.    Command:
  331.  
  332. Since I have no idea what is in the "articles" subdirectory that I
  333. just entered, I type
  334.  
  335.           dir
  336.  
  337. and the following appears on my screen:
  338.  
  339.    >>>PORT 130,160,4,100,222,127
  340.    200 PORT command successful
  341.    >>>LIST
  342.    150 Opening ASCII mode data connection for /bin/ls.
  343.    Total 382
  344.    -rw-rw-r--   1 0      120          1510 Jan  3  1992 editors.box.text
  345.    -rw-rw-r--   1 0      120         46167 Jan  3  1992 fall91.issue
  346.    -rw-rw-r--   1 0      120         52864 Jan  3  1992 spring91.issue
  347.    -rw-rw-r--   1 0      120          1515 Jan  3  1992 sub.form.txt
  348.    -rw-rw-r--   1 0      120         36418 Jan  3  1992 summer91.issue
  349.    -rw-rw-r--   1 0      120         53606 Jan  3  1992 winter90.issue
  350.    226 Transfer complete
  351.  
  352. COOL! These files already have extensions (winter90.issue, etc.), so
  353. getting them is going to be a breeze!
  354.  
  355. Let's get the Fall '91 issue. Since I want the file "fall91.issue", I type
  356.  
  357.           get fall91.issue
  358.  
  359. and the following appears on my screen:
  360.  
  361.    >>>PORT 130,160,4,100,224,34
  362.    200 PORT command successful
  363.    >>>RETR fall91.issue
  364.    150 Opening ASCII mode data connection for fall91.issue (46167 bytes).
  365.  
  366. After a few seconds, the following is added to my screen:
  367.  
  368.    226 Transfer complete.
  369.    47151 bytes transferred. Transfer rate 16.58 Kbytes/sec.
  370.  
  371. IT WORKED!!! YAY!!! :)
  372.  
  373. I then quit FTP by typing either "bye" or "quit", and I am done!
  374. The file "fall91.issue" is now sitting in my account on my
  375. local Internet service provider's machine!!
  376.  
  377. TOMORROW:
  378.  
  379.      - ASCII and Binary files
  380.      - getting multiple files
  381.      - file compression and unpacking
  382.      - *FTP using nothing but e-mail*
  383.  
  384.  
  385.    PATRICK DOUGLAS CRISPEN    THE VIEWS EXPRESSED IN THIS LETTER DO NOT
  386.     PCRISPE1@UA1VM.UA.EDU      NECESSARILY REPRESENT THE VIEWS OF THE
  387.   THE UNIVERSITY OF ALABAMA      UNIVERSITY OF ALABAMA - TUSCALOOSA
  388.  
  389.       ROADMAP: COPYRIGHT PATRICK CRISPEN 1994. ALL RIGHTS RESERVED.
  390.  
  391.  
  392.  
  393.